const sequelize = require("../app/db");
const { DataTypes, Model } = require("sequelize");

class ResourceCategory extends Model {}
ResourceCategory.init(
  {
    Id: {
      type: DataTypes.INTEGER,
      allowNull: false, //不允许为空
      primaryKey: true,
      autoIncrement: true,
    },
    CategoryId: {
      type: DataTypes.INTEGER,
    },
    ResourceId: {
      type: DataTypes.INTEGER,
    },
    ResourceType: {
      type: DataTypes.INTEGER,
    },
    Sort: {
      type: DataTypes.INTEGER,
    },
   
  },
  {
    sequelize,
    modelName: "ResourceCategory",
    tableName: "resource_category", //强制设置表名
  }
);

module.exports = ResourceCategory;
